﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true" CodeFile="DangKyTiem.aspx.cs" Inherits="Admin_DangKyTiem" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=txtNgayDangKy.ClientID%>").datepicker({ dateFormat: "dd/mm/yy"});
            $("#<%=txtNgaySinh.ClientID%>").datepicker({ dateFormat: "dd/mm/yy", maxDate: "+0D" });
            activeMenu(1, 0);
        });
    </script>
    <div class="divsize">
        <fieldset>
            <legend>Đăng ký tiêm</legend>
            <asp:Label ID="messageKetQua" runat="server" Enabled="False"></asp:Label>
           
            <asp:Panel ID="panelDangKyTiem" runat="server">
                <ol class="form form-clear">
                    <li>
                        <label>Mã Đăng ký</label>
                        <asp:TextBox ID="txtMDK" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Chứng minh thư bố mẹ</label>
                        <asp:TextBox ID="txtCMTBoMe" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Tên người đăng ký</label>
                        <asp:TextBox ID="txtTenNguoiDK" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Tên Bé</label>
                        <asp:TextBox ID="txtTenBe" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Ngày sinh</label>
                        <asp:TextBox ID="txtNgaySinh" runat="server"></asp:TextBox>                        
                    </li>
                    <li>
                        <label>Tuổi</label>
                        <asp:TextBox ID="txtTuoi" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Giới tính</label>
                        <asp:RadioButtonList ID="rbtnGioiTinh" runat="server">
                            <asp:ListItem Value="true" check="checked">Nam</asp:ListItem>
                            <asp:ListItem Value="false">Nữ</asp:ListItem>                            
                        </asp:RadioButtonList>                                                    
                    </li>
                    <li>
                        <label>Địa chỉ</label>
                        <asp:TextBox ID="txtDiaChi" runat="server"></asp:TextBox>
                    </li>
                    <li>
                        <label>Ngày đăng ký</label>
                        <asp:TextBox ID="txtNgayDangKy" runat="server"></asp:TextBox>
                    </li>                    
                    <li>
                        <label></label>
                        <asp:Button ID="btnThem" runat="server" CssClass="btn primary" Text="Thêm mới" OnClick="btnThem_Click" />
                        <asp:Button ID="btnSua" Enabled="false" runat="server" CssClass="btn primary" Text="Sửa thông tin" OnClick="btnSua_Click"/>
                    </li>
                </ol>
            </asp:Panel>
        </fieldset>
    </div>
    <div>
        <fieldset>
            <legend>Danh sách</legend>
            <asp:ListView ID="ListViewDangKyTiem" runat="server"
                 OnItemCommand="ListViewDangKyTiem_OnItemCommand"
                 OnItemDeleting="ListViewDangKyTiem_OnItemDeleting"
                 OnItemUpdating="ListViewDangKyTiem_OnItemUpdating">
                <LayoutTemplate>
                    <table border="1">
                        <tr>
                            <th>Mã Đăng ký</th>
                            <th>Chứng minh thư bố mẹ</th>
                            <th>Tên người đăng ký</th>
                            <th>Tên Bé</th>
                            <th>Ngày sinh</th>
                            <th>Tuổi</th>
                            <th>Giới tính</th>
                            <th>Địa chỉ</th>
                            <th>Ngày đăng ký</th>
                            <th>Thao tác</th>
                        </tr>
                        <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                    </table>
                    <asp:DataPager ID="DangKyTiemDataPager" runat="server" PageSize="10">
                        <Fields>
                            <asp:NextPreviousPagerField ButtonType="Button"
                                ShowFirstPageButton="true"
                                ShowNextPageButton="false"
                                ShowPreviousPageButton="false" />
                            <asp:NumericPagerField ButtonCount="10" />
                            <asp:NextPreviousPagerField ButtonType="Button"
                                ShowLastPageButton="true"
                                ShowNextPageButton="false"
                                ShowPreviousPageButton="false" />
                        </Fields>
                    </asp:DataPager>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><%# Eval("MaDK") %></td>
                        <td><%# Eval("CMTBoMe") %></td>
                        <td><%# Eval("TenNguoiDK") %></td>
                        <td><%# Eval("TenBe") %></td>
                        <td><%# Eval("NgaySinh") %></td>
                        <td><%# Eval("Tuoi") %></td>
                        <td><%# Eval("GioiTinh") %></td>
                        <td><%# Eval("DiaChi") %></td>
                        <td><%# Eval("NgayDK") %></td>
                        <td >
                            <asp:LinkButton ID="LinkButtonSua" 
                                ToolTip="Sửa thông tin" 
                                runat="server" 
                                CommandArgument='<%# Eval("MaDK") %>'
                                CommandName="Update">Sửa</asp:LinkButton>
                            |
                            <asp:LinkButton ID="LinkButtonXoa" 
                                ToolTip="Xóa một bản ghi" 
                                runat="server" 
                                CommandArgument='<%# Eval("MaDK") %>'
                                CommandName="Delete" 
                                ForeColor="Brown" 
                                OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')">Xóa</asp:LinkButton>                            
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </fieldset>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <ul class="m-melanin-vertical-navigation">
        <li>
            <span  class="ss_sprite ss_shield">&nbsp;</span>
            <a id="A4" href="DangKyTiem.aspx" class="m-melanin-vertical-navigation">Đăng ký tiêm</a>
        </li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">

</asp:Content>

